package com.sanshui.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


@NoArgsConstructor
@AllArgsConstructor
@Data
public class User {

    /**
     * 用户id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String user_id;
    /**
     * 用户姓名
     */
    @TableField(value = "name")
    private String name;
    /**
     * 用户生日
     */
    @TableField(value = "birthday")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;
    /**
     * 用户年龄
     */
    @TableField(value = "age")
    private Integer age;
    /**
     * 用户最后登录时间
     */
    @TableField(value = "loginTime")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date loginTime;


    /**
     * 用户密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 用户登录状态
     */
    @TableField(value = "loginStatic")
    private Integer loginStatic;
}
